﻿<MListItem Exact Style="height:38px;" Class="px-6" Link Href="@Href">
    <ItemContent>
        <MListItemIcon Class="mr-2">
            <MIcon Color="@ListItemIconColor(context.Active)" Size=18>@Icon</MIcon>
        </MListItemIcon>
        <MListItemContent>
            <MListItemTitle Class="@ListItemTitleClass(context.Active)">@Title</MListItemTitle>
        </MListItemContent>
    </ItemContent>
</MListItem>


@code {
    string ListItemIconColor(bool active) => IconColor ?? (active ? "primary" : "neutral-lighten-4");
    static string ListItemTitleClass(bool active) => active ? "text-subtitle primary--text" : "text-body neutral-lighten-4--text";

    [Parameter]
    public string Href { get; set; }

    [Parameter]
    public string Icon { get; set; }

    [Parameter]
    public string? IconColor { get; set; }

    [Parameter]
    public string Title { get; set; }

}
